//
//  HYSettingModel.m
//  XPlayer
//
//  Created by 张水 on 2023/9/11.
//

#import "HYSettingModel.h"
#import "NSArray+SafeKit.h"

@implementation HYSettingModel

@end


@implementation HYSettingDataSource

+ (NSArray *)settingArray
{
    // section 0
    NSMutableArray *commonarray = [NSMutableArray array];
    
    {
        HYSettingModel *model = [[HYSettingModel alloc]init];
        model.title = NSLocalizedString(@"设备储存空间", nil);
        model.dataID = kMemory;
        model.cellStyle = HYSettingCellTextOnly;
        [commonarray hy_addObject:model];
    }
    {
        HYSettingModel *model = [[HYSettingModel alloc]init];
        model.title = NSLocalizedString(@"切换语言", nil);
        model.dataID = kChangeLanguage;
        model.cellStyle = HYSettingCellArrowOnly;
        [commonarray hy_addObject:model];
    }
    if (@available(iOS 13.0, *)) {
        {
            HYSettingModel *model = [[HYSettingModel alloc]init];
            model.title = NSLocalizedString(@"外观", nil);
            model.dataID = kChangeTheme;
            model.cellStyle = HYSettingCellTextArrow;
            [commonarray hy_addObject:model];
        }
    }
//    {
//        HYSettingModel *model = [[HYSettingModel alloc]init];
//        model.title = NSLocalizedString(@"添加视频播放类型", nil);
//        model.dataID = kPlayStyle;
//        model.cellStyle = HYSettingCellArrowOnly;
//        [commonarray hy_addObject:model];
//    }
    

    // setion1
    NSMutableArray *cacheArray = [NSMutableArray array];
    
    {
        HYSettingModel *model = [[HYSettingModel alloc]init];
        model.title = NSLocalizedString(@"音视频下载", nil);
        model.dataID = kMineDownload;
        model.cellStyle = HYSettingCellArrowOnly;
        model.hideLine = YES;
        [cacheArray hy_addObject:model];
    }
    
    {
        HYSettingModel *model = [[HYSettingModel alloc]init];
        model.title = NSLocalizedString(@"允许移动网络下载", nil);
        model.dataID = kAllowNetwork;
        model.cellStyle = HYSettingCellOption;
        model.hideLine = YES;
        [cacheArray hy_addObject:model];
    }
    
    // section2
    NSMutableArray *playerArray = [NSMutableArray array];
    
    {
        HYSettingModel *model = [[HYSettingModel alloc]init];
        model.title = NSLocalizedString(@"自动播放下一个", nil);
        model.dataID = kAutoPlayNext;
        model.cellStyle = HYSettingCellOption;
        [playerArray hy_addObject:model];
    }
    
    {
        HYSettingModel *model = [[HYSettingModel alloc]init];
        model.title = NSLocalizedString(@"允许后台播放", nil);
        model.dataID = kAllowBackground;
        model.cellStyle = HYSettingCellOption;
        [playerArray hy_addObject:model];
    }
    
    {
        HYSettingModel *model = [[HYSettingModel alloc]init];
        model.title = NSLocalizedString(@"无痕浏览", nil);
        model.dataID = kAllowPrivateBrowse;
        model.cellStyle = HYSettingCellOption;
        [playerArray hy_addObject:model];
    }
    
    {
        HYSettingModel *model = [[HYSettingModel alloc]init];
        model.title = NSLocalizedString(@"截图后是否保存到相册", nil);
        model.dataID = kAllowScreenShotSavePhoto;
        model.cellStyle = HYSettingCellOption;
        model.hideLine = YES;
        [playerArray hy_addObject:model];
    }
    
//    {
//        HYSettingModel *model = [[HYSettingModel alloc]init];
//        model.title = NSLocalizedString(@"静音播放", nil);
//        model.dataID = kMutePlayback;
//        model.cellStyle = HYSettingCellOption;
//        model.hideLine = YES;
//        [playerArray hy_addObject:model];
//    }
    
    // section3
    NSMutableArray *otherArray = [NSMutableArray array];
 
    {
        HYSettingModel *model = [[HYSettingModel alloc]init];
        model.title = NSLocalizedString(@"一键还原", nil);
        model.dataID = kClearMemory;
        model.cellStyle = HYSettingCellArrowOnly;
        [otherArray hy_addObject:model];
    }
    
    {
        HYSettingModel *model = [[HYSettingModel alloc]init];
        model.title = NSLocalizedString(@"反馈意见", nil);
        model.dataID = kFeedback;
        model.cellStyle = HYSettingCellArrowOnly;
        [otherArray hy_addObject:model];
    }
    
    {
        HYSettingModel *model = [[HYSettingModel alloc]init];
        model.title = NSLocalizedString(@"给个好评", nil);
        model.dataID = kGoodReview;
        model.cellStyle = HYSettingCellArrowOnly;
        [otherArray hy_addObject:model];
    }
    {
        HYSettingModel *model = [[HYSettingModel alloc]init];
        model.title = NSLocalizedString(@"鼓励支持", nil);
        model.dataID = kGivePrize;
        model.cellStyle = HYSettingCellArrowOnly;
        [otherArray hy_addObject:model];
    }
    
    {
        HYSettingModel *model = [[HYSettingModel alloc]init];
        model.title = NSLocalizedString(@"关于我们", nil);
        model.dataID = kAboutUs;
        model.cellStyle = HYSettingCellArrowOnly;
        model.hideLine = YES;
        [otherArray hy_addObject:model];
    }
    NSArray *array = [NSArray arrayWithObjects:commonarray,cacheArray,playerArray,otherArray, nil];
    return array;
}

@end
